On the Subject of The Red Cipher

Seeing red is the standard for this module.

On the module, you will see 3 screens, a keyboard, 2 arrows, and a submit button that displays the current page you’re on.

Pressing the right arrow takes you to the next page. Pressing the left arrow takes you to the previous page. There is a total of 2 pages.

On page 1, the top screen shows a 6 letter encrypted word, the middle screen shows a 6 letter string. If the encrypted word has any Js, replace each J with the letter in the same position as the string in the middle screen. After you do all 3 steps, change the letter(s) back into a J.

On page 2, all 3 screens show a word. The top screen will be referred to as KW1, the middle screen will be called KW2, and finally the bottom screen will be KW3.

Take the encrypted word and follow the mechanics down below:

Step 1: Tri-square Cipher

This step requires 3 matrices and the encrypted word from the top screen of page 1.

To create the 1st matrix, first replace any Js with Is in KW1, and remove any duplicate letters from the keyword (keep each letter’s first occurrence). Then take the alphabet and remove any occurrences of all the letters in your current key.

If the first digit of the serial number is odd, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.

Rearrange the new 25 length string into a 5×5 matrix.

To create the 2nd matrix, first replace any Js with Is in KW2, and remove any duplicate letters from the keyword (keep each letter’s first occurrence). Then take the alphabet and remove any occurrences of all the letters in your current key.

If the second digit of the serial number is even, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.

Rearrange the new 25 length string into another 5×5 matrix.

To create the 3rd matrix, first replace any Js with Is in KW3, and remove any duplicate letters from the keyword (keep each letter’s first occurrence). Then take the alphabet and remove any occurrences of all the letters in your current key.

If the last digit of the serial number is odd, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.

Rearrange the new 25 length string into another 5×5 matrix. You should now have 3 matrices.

Split the encrypted word into 3 letter pairs. For each letter pair do the following:

  • Take the first letter and find it in the 1st matrix to get a row and column
  • Next find the second letter in the 2nd matrix to get another row and column.
  • Use the row of the 1st matrix and the column of the 2nd matrix for the 3rd matrix to get the 1st letter.
  • Use the column of the 1st matrix and the row of the 2nd matrix for the 3rd matrix to get the 2nd letter.

The resulting letters will become your new encrypted word.

Example

Encrypted Word: BEWCSG
Key 1: MALBCDEFGHIKNOPQRSTUVWXYZ
Key 2: ABCDFGIKLMNOQTUVWXYZSPHER
Key 3: ABCDEFGIKLNPQSTVWXYZHUMOR

MALBC|ABCDF|ABCDE
DEFGH|GIKLM|FGIKL
IKNOP|NOQTU|NPQST
QRSTU|VWXYZ|VWXYZ
VWXYZ|SPHER|HUMOR

BE -> DO
WC -> MB
SG -> VI
New Encrypted Word: DOMBVI

Step 2: Conjugated Matrix Bifid

This step requires 2 matrices made from KW1 and KW2 from step 1 and the encrypted word from the 1st step.

For each letter of the encrypted word, do the following:

  • Find the letter in the 1st matrix to get a row/col pair.
  • Write the row/col pair so that the top number is the row and the bottom number is the column.
  • Make sure to write it to the right of any previous row/col pairs.

Read the entire number string in reading order and split it into a new set of 6 row/col pairs.

For each row/col pair, use it in the 2nd matrix to get a new letter.

The resulting letters will form your new encrypted word.

Example

Encrypted Word: DOMBVI

12345|12345
1MALBC|ABCDF1
2DEFGH|GIKLM2
3IKNOP|NOQTU3
4QRSTU|VWXYZ4
5VWXYZ|SPHER5

D -> 21
O -> 34
M -> 11
B -> 14
V -> 51
I -> 31

231153
141411

23 -> K
11 -> A
53 -> H
14 -> D
14 -> D
11 -> A
New Encrypted Word: KAHDDA

Step 3: Playfair Cipher

This step requires the matrix made using KW1 from step 1 and the encrypted word from the 2nd step.

Split the encrypted word into character pairs. For each pair:

  • If the 2 letters are exactly the same, keep them as is.
  • Otherwise, if the letters appear on the same row of your matrix, replace them with the letters to their immediate right respectively, wrapping around to the left side of the row.
  • Otherwise, if the letters are on the same column of your matrix, replace them with the letters immediately below, wrapping to the top.
  • Otherwise, replace each of them with the letter on the same row but in the column of the other letter in the original pair.

Remember to replace any letters that were Js initially to a J to get your decrypted word.

Example

Encrypted Word: KAHDDA

MALBC
DEFGH
IKNOP
QRSTU
VWXYZ

KA -> RE
HD -> DE
DA -> EM
Decrypted Word: REDEEM

Once you finally have your decrypted word, you can submit it. Once you start typing, all the screens will go black and the bottom screen will show what you are typing.

To clear it, just click one of the arrows. This goes to one of the pages and clears any input you put in. It will not let you go over 6 letters on input.

Once you are satisfied with your input, press the button labeled "SUB" to submit your answer. On a strike, the module will go back to the first page of the module, but it does not regenerate.